package com.jindianjichi.subject.common.enums;

import lombok.Getter;

//@Getter
public enum SubjectInfoTypeEnum {
    RADIO(1,"单选"),
    MULTIPLY(2,"多选"),
    JUDGE(3,"判断"),
    BRIEF(4,"简答");
    public int code;
    public String desc;
    SubjectInfoTypeEnum(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

public static SubjectInfoTypeEnum getByCode(int codeVal){
    for (SubjectInfoTypeEnum subjectInfoTypeEnum : SubjectInfoTypeEnum.values()) {
        if (subjectInfoTypeEnum.code==codeVal){
            return subjectInfoTypeEnum;
        }
    }
    return null;
}

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
